package cn.wolfcode.wms.qo;

import lombok.Getter;
import lombok.Setter;
import org.springframework.format.annotation.DateTimeFormat;

import java.util.*;

@Getter
@Setter
public class OrderBillQueryObject  extends QueryObject{
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    private Date beginDate ;
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    private Date endDate;
    private Long supplierId = -1L;
    private Integer status = -1 ;
    private Long brandId = -1L ;




    private void setEndDate(Date date){
        if(date == null){
           return;
        }
        Calendar calendar = Calendar.getInstance();
        calendar.setTime(date);
        calendar.set(Calendar.HOUR_OF_DAY,23);
        calendar.set(Calendar.MINUTE ,59);
        calendar.set(Calendar.SECOND, 59 );
        this.endDate = calendar.getTime();
    }
}
